package ctn.util;

import java.util.Hashtable;
import java.util.Map;


import org.springframework.stereotype.Component;


import ctn.event.EventFactory;

@Component
public class EventUtil {
	private final Map<String, EventFactory> eventIdConfigs = new Hashtable<String, EventFactory>();

	public void addFactory(EventFactory factory){
		LogUtil.printInfo("add EventProcessor:"+factory.getEventID());
		eventIdConfigs.put(factory.getEventID(), factory);
		
	}
	public EventFactory getFactory(String eventID){
		return this.eventIdConfigs.get(eventID);
	}
}
